{include file="layout/top"/}
<div class="box">
  <div class="box-header ">
    
    <ob_link><a class="btn" style="color:#fff;background:#3c8dbc;" href="{:url('staffMonthPriceAdd',array('staff_id'=>$staff_id))}"><i class="fa fa-plus"></i> 新 增</a></ob_link>
    &nbsp;
    
    </div>
    <br/>
  </div>
    
  <div class="box-body table-responsive">
    <table  class="table table-bordered table-hover">
      <thead>
      <tr>
          <th>姓名</th>
          <th>基本工资</th>
          <th>全勤</th>
          <th>补贴</th>
          <th>绩效</th>
          <th>总薪</th>
          <th>月份</th>
          <!-- <th>备注</th> -->
          <th>操作</th>
      </tr>
      </thead>
      
      {notempty name='list'}
        <tbody>
            {volist name='list' id='vo'}
                <tr>
                  <td>{$vo.staff_name}</td>
                  <td>{$vo.price1}</td>
                  <td>{$vo.price2}</td>
                  <td>{$vo.price3}</td>
                  <td>{$vo.price4}</td>
                  <td>{$vo.price1+$vo.price2+$vo.price3+$vo.price4}</td>
                  <td>{$vo.month}</td>
                  <td class="col-md-4 text-center">
                      <ob_link><a href="{:url('staffMonthPriceEdit', array('id' => $vo['id'],'staff_id' => $staff_id))}" class="btn" style="padding:2px 5px;color:#fff;background:#3c8dbc"><i class="fa fa-edit"></i> 编 辑</a></ob_link>
                      &nbsp;
                      <ob_link><a class="btn layerDel"  style="padding:2px 5px;color:#fff;background:#3c8dbc" url="{:url('staffMonthPriceDel', array('id' => $vo['id']))}" href="javascript:void(0)" staff_id="{$staff_id}"><i class="fa fa-trash-o"></i> 删 除</a></ob_link>
                  </td>
                </tr>
            {/volist}
        </tbody>
        {else/}
        <tbody><tr class="odd"><td colspan="8" class="text-center" valign="top">{:config('empty_list_describe')}</td></tr></tbody>
      {/notempty}
    </table>
  </div>

 

</div>
<script src="__STATIC__/module/admin/laydate/laydate.js"></script>
<script src="__STATIC__/module/admin/laydate/layer.js"></script>
<script>

    $('.dataimport').click(function(){
      url=$(this).attr('url');
      layer.open({
        type: 2,
        shade: false,
        title: false, //不显示标题
        content:url, //捕获的元素
        area: ['480px','200px']
      });
    })
    // 时间插件
    lay('.test-item').each(function(){
      laydate.render({
        elem: this
        ,trigger: 'click'
        // ,type: 'month' //日期格式
      });
   });

    $('.layerDel').click(function(){
      var target =$(this).attr('url');
      var staff_id=$(this).attr('staff_id');
      layer.confirm('您确定要删除吗？', {
        btn: ['确认','取消'] //按钮
      }, function(){
        $.get(target).success(function(data){
          layer.msg(data.msg);
          setTimeout(function(){
            location.href='/admin/staff/staffmonthpricelist/id/'+staff_id+'.html'
          },2000)
        });
      })
    })
</script>